package com.sustcoder.blog.Blog09.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * Created by lenovo on 2017/9/29.
 */

@JsonIgnoreProperties(ignoreUnknown=true) // 忽略掉未知属性
public class ChildJsonBean extends JsonBean {

    private String height;
    private String width;
    private String userid;

    public String verfiyParams(){
        String params=new StringBuffer()
                .append(",osOutNo:").append(this.getOsOutNo())
                .append(",osFileName:").append(this.getOsFileName())
                .append(",osFileType:").append(this.getOsFileType())
                .append(",osFileFullType:").append(this.getOsFileFullType())
                .append(",osTplVerNo:").append(this.getOsTplVerNo())
                .append(",userid:").append(userid).append(",").toString();
        System.out.println("bean to String: "+params);
        int index=params.indexOf(":,");
        if(index < 0 ){
            index=params.indexOf(":null,");
            if(index<=-1){
                return "";
            }
        }
        String subStr=params.substring(0,index);
        return subStr.substring(subStr.lastIndexOf(",")+1,subStr.length());
    }

    public String getHeight() {
        return height;
    }

    public void setHeight(String height) {
        this.height = height;
    }

    public String getWidth() {
        return width;
    }

    public void setWidth(String width) {
        this.width = width;
    }


}
